import threading
name = "lucky"

def run1():
    global name
    print(name)
    name = "张三"
    print("run1")

def run2():
    global name
    print(name)
    name = "李四"
    print("run2")



if __name__ == '__main__':
    # 线程的全局变量是共享的

    t1 = threading.Thread(target=run1)
    t2 = threading.Thread(target=run2)

    t1.start()
    t2.start()

    t1.join()
    t2.join()

    print("over")